home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 6146 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.7 KB

  1. Path: news.primenet.com!not-for-mail
  2. From: gbe@primenet.com (Gary Edstrom)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Can anyone explain ?
  5. Date: 10 Feb 1996 08:50:02 -0700
  6. Organization: Sequoia Software
  7. Sender: root@primenet.com
  8. Message-ID: <311cbd5e.812670142@news.primenet.com>
  9. References: <823907577.10880@le-vamp.demon.co.uk>
  10. X-Posted-By: ip049.lax.primenet.com
  11. X-Newsreader: Forte Agent .99d/32.182
  12.  
  13. Kurt@le-vamp.demon.co.uk (Kurt Frary) wrote:
  14. >A) can someone give me some decent comments for the code ?
  15.  
  16. >B) What the difference between
  17. >    Regs.w.ax - I have only a guess that this will load ax with
  18. >whatever 32 bit code, or am I being a lamer ?
  19. >and    Regs.h.bl - Load bl with whatever 16 bit ?
  20.  
  21. Regs.w.ax = 0x0300 is equivilant to the assembly code "mov ax,1"
  22. Regs.h.bl = 0x10   is equivilant to the assembly code "mov bl,10H"
  23.  
  24. You should look in the appropriate C header file for the exact definition of
  25. the REGS structure.  It is part of setting up the processor registers for an
  26. assembly language type call to the operating system.  The "Regs.w" format
  27. addresses the word wide registers, while "Regs.h" addresses the byte wide
  28. registers.  This definition is made with a union because the two groups of
  29. registers overlap to a certain extent.
  30.  
  31. >C) How do i know how many parameters to pass to int386x ? i.e. Sregs,
  32. >regs e.t.c.
  33.  
  34. You need to get an MS-DOS reference book that includes entry points for DOS any
  35. ROM BIOS functions you may be calling.
  36.  
  37.  
  38. --
  39. Gary Edstrom <gbe@primenet.com> | Sequoia Software
  40. PO Box 9573                     | Programming & Technical Services
  41. Glendale CA 91226-0573          | PGP Key ID: 0x1A0D44BD
  42. PGP Fingerprint: 72 AA 4F 73 05 53 89 C6  8A EE F4 EE D1 C0 13 8D 
  43.